﻿namespace Core.Ndatax.Domain.Dto
{

    #region 入参
    public class RqSetStateDto
    {
        public List<RequisitionStateItem> List { get; set; }
    }

    public class RequisitionStateItem
    {
        public RequisitionState RequisitionState { get; set; }
    }

    public class RequisitionState
    {
        /// <summary>
        /// 操作类型(mod) (必填) varchar(50)
        /// </summary>
        public string operateflag { get; set; } = "";

        /// <summary>
        /// 电子申请单号varchar(50)
        /// </summary>
        public string sheetid { get; set; } = "";

        /// <summary>
        /// 详见状态类别字典
        /// </summary>
        public string statetype { get; set; } = "";

        /// <summary>
        /// 状态编码（详情查看对应的状态类别字典内再对应的字典值）
        /// </summary>
        public string stateresult { get; set; } = "";

        /// <summary>
        /// 操作者id
        /// </summary>
        public string operatorid { get; set; } = "";

        /// <summary>
        /// 操作者姓名
        /// </summary>
        public string operatorname { get; set; } = "";

        /// <summary>
        /// 对应状态的实际日期(yyyyMMdd)
        /// </summary>
        public string operatordate { get; set; } = "";

        /// <summary>
        /// 对应状态的实际时间(HHmmss)
        /// </summary>
        public string operatortime { get; set; } = "";

        /// <summary>
        /// 更新原因(仅用于部分非常规状态更新时，传入标注说明，例如：退检时，说明退检原因，及退检相关信息)
        /// </summary>
        public string memo { get; set; } = "";

        /// <summary>
        /// 排队号
        /// </summary>
        public string queuenum { get; set; } = "";

        /// <summary>
        /// 操作人ip地址 （非必填）
        /// </summary>
        public string clientip { get; set; } = "";

        /// <summary>
        /// 影像号
        /// </summary>
        public string imagenum { get; set; } = "";

        /// <summary>
        /// 检查地点（非必填）
        /// </summary>
        public string checkpoint { get; set; } = "";

        /// <summary>
        /// 检查号源池（非必填）
        /// </summary>
        public string checkroom { get; set; } = "";

        /// <summary>
        /// 检查流水号（当状态类别为5时此字段必填）
        /// </summary>

        public string ris_requisitionid { get; set; } = "";

        //以下内容医院上线岱嘉的数据平台/医技平台时必填，对应的机构域和系统域联系岱嘉项目经理进行申请，格式参考系统域字典表
        /// <summary>
        ///文档对应的机构域(必填)
        /// </summary>
        public string documentdomainid { get; set; } = "";

        /// <summary>
        /// 文档的唯一id号(必填)尽量填写申请单号
        /// </summary>
        public string documentuniqueid { get; set; } = "";

        /// <summary>
        /// 申请单域(必填)
        /// </summary>
        public string requestdomain { get; set; } = "";

        /// <summary>
        /// 患者姓名(必填)
        /// </summary>
        public string patientname { get; set; } = "";

        /// <summary>
        /// 患者门诊号(必填)
        /// </summary>
        public string hisidmz { get; set; } = "";

        /// <summary>
        /// 患者住院号(必填)
        /// </summary>
        public string hisidzy { get; set; } = "";

        /// <summary>
        /// 患者流水号(必填)
        /// </summary>
        public string visitflowid { get; set; } = "";

        /// <summary>
        ///检查科室代码(必填)
        /// </summary>
        public string examksdm { get; set; } = "";

        /// <summary>
        ///患者类型代码 详情患者类型字典(必填)
        /// </summary>
        public string patientstyle { get; set; } = "";

        /// <summary>
        /// 子项目信息
        /// </summary>
        public List<ExamState> ExamStateList { get; set; } = new List<ExamState>();
    }
    public class ExamState
    {
        //
        // 摘要:
        //     第三方 检查项目代码(必填) varchar(12)
        public string itemcode { get; set; }
        //
        // 摘要:
        //     检查状态（详情见检查状态字典）(必填) Int
        public string examstate { get; set; }
    }
    #endregion

    #region 出参
    public class ResSetStateDto
    {
        /// <summary>
        /// 状态更新出参
        /// </summary>
        public List<ResSetStateDtoItem> List { get; set; } = new List<ResSetStateDtoItem>();
    }

    public class ResSetStateDtoItem
    {
        /// <summary>
        /// 申请单号
        /// </summary>

        public string SheetID { get; set; }
        /// <summary>
        /// 状态类型
        /// </summary>

        public int StateType { get; set; }
        /// <summary>
        /// 状态值
        /// </summary>

        public int StateResult { get; set; }
        /// <summary>
        /// 结果
        /// </summary>

        public int Result { get; set; }
    }

    #endregion

}
